'''
嫁接、切除、就地修改
看一看，这就牛了，为数据而生
'''


def normal():
    l = list(range(10))
    print(l)
    l[2:5] = [20, 30]
    print(l)
    del l[5:7]
    print(l)
    l[3::2] == [11, 22]
    print(l)
    # l[2:5] = 100
    l[2:5] = [100]  # 必须是一个可迭代的序列
    print(l)


# + 不改变原有序列，产生一个全新的序列
def plus():
    a = list(range(2))
    b = list(range(3))
    print(a + b)


# *
def mul():
    l = [1, 2, 3]
    print(l * 5)
    print(5 * 'abcd ')


if __name__ == '__main__':
    # normal()
    # plus()
    mul()
    print('done')
